<template>
    <div class="main-scrollbar">
        <div class="main-header">
            <el-descriptions
                style="width:100%"
                :column="1"
                size="medium"
                border
                :labelStyle="{ 'white-space': 'nowrap', 'width': '100px' }"
            >
                <el-descriptions-item label="头像">
                    <el-image
                        style="width:50px;height:50px;"
                        :src="archiveData.avatar"
                        :preview-src-list="[archiveData.avatar]"
                    ></el-image>
                </el-descriptions-item>
                <el-descriptions-item label="用户名">{{
                    archiveData.username
                }}</el-descriptions-item>
                <el-descriptions-item label="昵称">{{
                    archiveData.nickname
                }}</el-descriptions-item>
                <el-descriptions-item label="邮箱">{{
                    archiveData.email
                }}</el-descriptions-item>
                <el-descriptions-item label="手机号">{{
                    archiveData.mobile
                }}</el-descriptions-item>
                <el-descriptions-item label="最后登录时间">{{
                    archiveData.lastlogintime
                }}</el-descriptions-item>
            </el-descriptions>
        </div>
    </div>
</template>

<script>
import { get } from "@/assets/js/http.js";

export default {
    name: "view-archive",
    data() {
        return {
            archiveData: {}
        };
    },
    mounted() {
        this.getArchiveData();
    },
    methods: {
        async getArchiveData() {
            const result = await get({
                url: "/admin/routine.AdminInfo/index",
                loading: true,
                params: {}
            });
            this.archiveData = result.info;
        }
    }
};
</script>